<template>
<div class="app-box">
  <h1>根组件</h1>
  <!-- 路由链接 -->
  <router-link to="/home">首页</router-link>
  <router-link to="/about">关于</router-link>
   <router-link to="/my">我的</router-link>
  <hr />
  <!-- 路由视图 -->
 
<transition name="fade" class="dv">
    <router-view></router-view>
</transition>
   
   
</div>
</template>
<script setup>
</script>
<style scoped>
.fade-enter-active,.fade-leave-active{
    transition: opacity 5s ease;
}
.fade-enter-from,.fade-leave-to{
    opacity: 0;
}
.app-box{
  text-align: center;
  font-size: 20px;
}

.app-box a{
  padding: 20px;
  color: rgb(0, 0, 0);
  text-decoration: none;
  font-weight: bold;

}
.app-box a.router-link-active{
  color: rgb(45, 241, 255);
}
</style>